多元平台設計:
import 'package:flutter/cupertino.dart’;
Ieport 'packoge:flutter/foundation.dart' as foundation;
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:veggietracker/data/models.dart';
ieport 'package:vegg ietracker/data/vegote.dart';
import 'packsgc:veagtetracker/utis.dart';
boot get isIOS => foundation.defaultTargetPlatform == TargetPlatform.iOS;
void main() => runApp(MyApp());
class MyApp extends StatelessHidget {
@override
Widget build(BuildContext context) {
return ChangeNotifierProvider<ApoState>(
builder: (context) => AppState(),
child: CupertinoApp(
debugShowCheckedlodeBanner: false,
theme: CupertinoThereData(
primaryColor: Color (OxFFFF2055),
), // CupertinoThesedata
home: MainScreen(),
),// CupertinoApp
);// ChangeNotifierProvider
}
}